package com.xiaohujr.xuexue.leetcode.meituan;

import java.util.ArrayList;
import java.util.List;

public class ClimbStairs {
    public int climbStairs(int n) {
        int[] dp = new int[n+1];
        for(int i=0;i<n+1;i++){
            if(i<3){
                dp[i]=i;
            }else {
                dp[i] = dp[i - 1] + dp[i - 2];
            }
        }
        return dp[n];
    }

    public static void main(String[] args) {
        new ClimbStairs().climbStairs(4);
        List<List<Integer>> triangle = new ArrayList<>();
        triangle.size();
    }
}
